package basic.time;

import java.time.ZoneId;
import java.time.ZonedDateTime;

//讲解时区
public class demo3 {
    public static void main(String[] args) {
   ZoneId A= ZoneId.systemDefault();
        System.out.println(A);
        System.out.println(ZoneId.getAvailableZoneIds());//打印全部时区
       ZoneId B= ZoneId.of("Asia/Aden");//把时区封装成对象
        ZonedDateTime now=ZonedDateTime.now(B);
        System.out.println(B);
        System.out.println(now);
    }
}
